package com.matrix.java.chap_03;

import java.util.Scanner;

public class Ex3_05 {
    public Ex3_05() {
    }

    public static void main(String[] args) {
        System.out.print("Enter today's day: ");
        Scanner input = new Scanner(System.in);
        int todayNum = input.nextInt();
        String today = "";
        switch(todayNum) {
            case 0:
                today = "Sunday";
                break;
            case 1:
                today = "Monday";
                break;
            case 2:
                today = "Tuesday";
                break;
            case 3:
                today = "Wednesday";
                break;
            case 4:
                today = "Thursday";
                break;
            case 5:
                today = "Friday";
                break;
            case 6:
                today = "Saturday";
        }

        System.out.print("Enter the number of days elapsed since today: ");
        int num = input.nextInt();
        int nextDayNum = todayNum + num;
        String nextDay = "";
        if (nextDayNum > 6) {
            nextDayNum %= 7;
        }

        switch(nextDayNum) {
            case 0:
                nextDay = "Sunday";
                break;
            case 1:
                nextDay = "Monday";
                break;
            case 2:
                nextDay = "Tuesday";
                break;
            case 3:
                nextDay = "Wednesday";
                break;
            case 4:
                nextDay = "Thursday";
                break;
            case 5:
                nextDay = "Friday";
                break;
            case 6:
                nextDay = "Saturday";
        }

        System.out.println("Today is " + today + " and the future day is " + nextDay);
    }
}
